Skip to content

Add certificate files and tolerate unknown resource types - #86

Merged
beneboy merged 2 commits into
mainfrom
certificate-files
Nov 22, 2026
Merged

beneboy merged 2 commits into
mainfrom
certificate-files

Conversation

@beneboy

@beneboy beneboy commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add CertificateFile, the file type for X.509 certificates that DataMasque trusts to verify a server. It uploads to api/files/certificates/ with the certificate_file form field, and reads the details of each certificate (is_ca, is_self_signed, not_valid_after, sha1_fingerprint) into certificates.
  • Add certificates to ResourceTypeName, so list_resources reads certificate files.
  • list_resources now leaves out a resource type the client does not know, and ProjectDeleteConflict.type is None for one. Before this change, a server that listed a new resource type made list_resources raise ValueError.

Tests

  • uv run pytest: 803 passed.
  • make lint (ruff, ruff format, mypy): passes.

Comment thread datamasque/client/models/files.py Resolved
Comment thread datamasque/client/models/files.py Resolved
Comment thread datamasque/client/models/project.py Resolved
Comment thread tests/test_projects.py Resolved
The server lists `is_ca`, `is_self_signed` and `not_valid_after` for each certificate, and no
`sha1_fingerprint`, so a required `sha1_fingerprint` failed every certificate list. Also note that
`CertificateFile` requires server version 3.26.23, and share one set of `ResourceTypeName` values
between the resources listing and project delete conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@beneboy
beneboy merged commit a083aeb into main Nov 22, 2026
9 checks passed
@beneboy
beneboy deleted the certificate-files branch November 22, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants